<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Examples</title>
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link href="" rel="stylesheet" />
</head>

<body>
    <div id="root">
        <!-- <div v-once='true'> 
       差值表达式
    {{title}}
        </div>
        <div v-html='msg'> </div>
        <div v-text='header'>{{msg}}</div>
        <div>{{ title }}-{{ header }}</div>
        <div v-bind:id='header'></div> -->
        <!-- <div>{{true ? 'hello': 'world'}}</div> -->
        <!-- <div>{{ true || 'hello' }}</div> -->
        <!-- <div>{{10 & 10}}</div> -->
        <!-- <div>{{num+1}}</div>  造成死循环-->
        <!-- <div>{{/\d+/.test(num)}}</div> -->
        <!-- <div>{{headerRun()}}</div> -->
        <!-- <div>{{title = 'olleh'}}</div> -->
        <!-- <div>{{var x = 0}}</div>赋值不可以 -->
        <!-- <div>{{if(true){console.log(0)}}}</div>不能写 -->
        <!-- <div>{{(function(title){console.log(title)})(title)}}</div>  -->
        <!-- v-if v-for v-model v-bind v-once v-on v-html v-on v-text-->
        <!-- <div v-on:keyup.enter='handleKeyup'></div> -->
        <!-- <div v-bind:[title]="'abc'"></div> -->
        <!-- 省略写法
        <div :x='0'></div>
        <div @click='handleClick'></div> -->
    </div>
    <script src="../vue.js"></script>
    <script>
        const data = {
            title: 'hello',
            msg: '<iframe src="https://www.sogou.com"></iframe>',
            header: 'line',
            num: 100,
        }
        var vm = new Vue({
            el: "#root",
            data,

            mounted() {
                setTimeout(() => {
                    this.title = 'world'
                }, 2000)
            },

            methods: {
                headerRun() {
                    console.log(0)
                }
            },
        })
        var y = 'a'
        var x = {
            [y]: 0,
            b: 1
        }
        console.log(x.a);
    </script>
</body>

</html>